﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Collections;
using BAL.EstRec;

namespace Nav3
{
    /// <summary>
    /// Lógica de interacción para TextBoxAutocomplete.xaml
    /// </summary>
    public partial class TextBoxAutocomplete : UserControl
    {
        public List<Pos> llenaComboPos; 
        public TextBoxAutocomplete()
        {
            InitializeComponent();
            llenaComboPos = BAL.EstRec.Pos.GetComboPos();
            autocomplete.ItemsSource = llenaComboPos;
           
        }

        

        private void autocomplete_GotFocus(object sender, RoutedEventArgs e)
        {
            autocomplete.IsDropDownOpen = true;
        }

        private void autocomplete_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (this.autocomplete.SelectedItem!=null)
            {
                string pos = ((Pos)this.autocomplete.SelectedItem).pos.ToString();
                string idPos = ((Pos)this.autocomplete.SelectedItem).idPos.ToString();
            }
            
        }
        
    }
}

